# -*- coding: utf-8 -*-

__author__ = 'Leon'

from flask.ext.login import (LoginManager, current_user, login_required,
                             login_user, logout_user, UserMixin, AnonymousUser,
                             confirm_login, fresh_login_required)


class AdminUser(UserMixin):
    def __init__(self, id, name, psw, active=True):
        self.name = name
        self.id = id
        self.active = active
        self.password = psw

    def is_active(self):
        return self.active


class Anonymous(AnonymousUser):
    name = u"Anonymous"



ADMIN_USERS = {
    1: AdminUser(1, u"wlh", u'123')
}

ADMIN_USERS_DICT = dict((u.name, u) for u in ADMIN_USERS.itervalues())



